Dynomotion

Group: DynoMotion Message: 12396 From: semperfikurt Date: 10/15/2015
Subject: PWM to spindle controller setup help.

I am working on setting up the PWM output to my spindle controller.  I can't seem to figure out what exactly I need to do to make this work as far as wiring and configuration goes.  I have the pwm input on my controller wired up to the pwm on KSTEP JP33 pin 6.... is this all I need to do?  The diagrams I have from the manufacturer of my spindle controller only show one wire input for this.  Also I don't really know what I need to set up in Kmotion to get the spindle overrides and S commands to function properly.  I have experimented a little with it, but it always just starts up and goes full blast RPM.  


I have gone through forums and such about this but being a bit of a noob, I don't understand 90 percent of what is being said.  


How exactly in idiot terms, do I set this up?


This is the router speed controller I am using.  The PWM control layout is on page 23.

http://www.vhipe.com/product-private/SuperPID-v2_Instructions.pdf


Group: DynoMotion Message: 12397 From: TK Date: 10/15/2015
Subject: Re: PWM to spindle controller setup help.
Hi semperfikurt,

KStep has an isolated Analog output that operates much like a 3 pin potentiometer POT) where some supply voltage is applied (+5V, +10V, or +12V and GND) and the output voltage can be commanded to a voltage between GND and the Supply.  See the section "Optically isolated PWM to Analog Circuit" here:
http://www.dynomotion.com/Help/SchematicsKStep/ConnectorsKStep.htm

Note a separate supply (or voltage from the Spindle Drive) should be used as the analog source in order to avoid defeating the isolation between the Spindle and other control logic. So in your case use the P5 pin on the SuperPID as a +5V source to KStep AnalogVcc. Use the PG pin as the Analog GND on KStep.


Once connected the Example Program \C Progams\KStep\Spindle_S_Kstep.c can be configured to KMotionCNC's S Action on the Tool Setup | M0-30 page.  Configure as Exec Prog with Var #1 and some unused Thread (ie #2).


At this point commanding an S word in GCode or in the MDI input such as:

S300

should set a Voltage on the Analog Output to control the speed.  The Spindle Override Slider should then also control the speed. You might confirm this with a voltmeter connected with the Black wire to the Analog Gnd and the Red wire to the Analog Output.


To Scale the speed properly for your system adjust the factor in the Spindle_S_Kstep.c Program to an RPM value that your system runs when commanded ith the full Analog Voltage:

define RPM_FACTOR 500.0 // RPM for full duty cycle (max analog out)

HTH
Regards
TK

On 10/15/2015 12:19 PM, semperfikurt@... [DynoMotion] wrote:
 

I am working on setting up the PWM output to my spindle controller.  I can't seem to figure out what exactly I need to do to make this work as far as wiring and configuration goes.  I have the pwm input on my controller wired up to the pwm on KSTEP JP33 pin 6.... is this all I need to do?  The diagrams I have from the manufacturer of my spindle controller only show one wire input for this.  Also I don't really know what I need to set up in Kmotion to get the spindle overrides and S commands to function properly.  I have experimented a little with it, but it always just starts up and goes full blast RPM.  


I have gone through forums and such about this but being a bit of a noob, I don't understand 90 percent of what is being said.  


How exactly in idiot terms, do I set this up?


This is the router speed controller I am using.  The PWM control layout is on page 23.

http://www.vhipe.com/product-private/SuperPID-v2_Instructions.pdf



Group: DynoMotion Message: 12404 From: kurt huizenga Date: 10/17/2015
Subject: Re: PWM to spindle controller setup help.
Ahh that worked perfectly!  I have been messing with that for the longest time, thanks so much!! 



On Thursday, October 15, 2015 4:32 PM, "TK tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi semperfikurt,

KStep has an isolated Analog output that operates much like a 3 pin potentiometer POT) where some supply voltage is applied (+5V, +10V, or +12V and GND) and the output voltage can be commanded to a voltage between GND and the Supply.  See the section "Optically isolated PWM to Analog Circuit" here:
http://www.dynomotion.com/Help/SchematicsKStep/ConnectorsKStep.htm

Note a separate supply (or voltage from the Spindle Drive) should be used as the analog source in order to avoid defeating the isolation between the Spindle and other control logic. So in your case use the P5 pin on the SuperPID as a +5V source to KStep AnalogVcc. Use the PG pin as the Analog GND on KStep.


Once connected the Example Program \C Progams\KStep\Spindle_S_Kstep.c can be configured to KMotionCNC's S Action on the Tool Setup | M0-30 page.  Configure as Exec Prog with Var #1 and some unused Thread (ie #2).


At this point commanding an S word in GCode or in the MDI input such as:

S300

should set a Voltage on the Analog Output to control the speed.  The Spindle Override Slider should then also control the speed. You might confirm this with a voltmeter connected with the Black wire to the Analog Gnd and the Red wire to the Analog Output.


To Scale the speed properly for your system adjust the factor in the Spindle_S_Kstep.c Program to an RPM value that your system runs when commanded ith the full Analog Voltage:

define RPM_FACTOR 500.0 // RPM for full duty cycle (max analog out)

HTH
Regards
TK

On 10/15/2015 12:19 PM, semperfikurt@... [DynoMotion] wrote:
 
I am working on setting up the PWM output to my spindle controller.  I can't seem to figure out what exactly I need to do to make this work as far as wiring and configuration goes.  I have the pwm input on my controller wired up to the pwm on KSTEP JP33 pin 6.... is this all I need to do?  The diagrams I have from the manufacturer of my spindle controller only show one wire input for this.  Also I don't really know what I need to set up in Kmotion to get the spindle overrides and S commands to function properly.  I have experimented a little with it, but it always just starts up and goes full blast RPM.  

I have gone through forums and such about this but being a bit of a noob, I don't understand 90 percent of what is being said.  

How exactly in idiot terms, do I set this up?

This is the router speed controller I am using.  The PWM control layout is on page 23.




Group: DynoMotion Message: 12405 From: kurt huizenga Date: 10/17/2015
Subject: Re: PWM to spindle controller setup help.
A few other little issues I have come across that I can't seem to iron out is the workflow... for normal cnc use do I need to run Kmotion at all or can I jump right into KmotionCNC? I have my INIT user button defined to load the "InitKStep3Axis.c" program which works fine, is that normally all that is required to get the machine running? 

 The reason I ask is because I have had issues with one of my steppers that is slaved to another always being disabled... The dual-stepper Y axis only powers one motor until I go into the step response screen for the slaved motors' channel and click "enable" under the servo section.  Then when I copy and save that to the .c file it works okay but it doesn't stay like that after I turn it off.  Also the I/O bit 16 keeps being turned off and won't stay on the way I want it.  I can click it on and everything works fine again though.  

I have gone through the copying configs to the open .c file and everything else I have configured thus far is working great but these two things for some reason won't stay put.  What should I do to solve this? 



On Saturday, October 17, 2015 2:13 PM, "kurt huizenga semperfikurt@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Ahh that worked perfectly!  I have been messing with that for the longest time, thanks so much!! 



On Thursday, October 15, 2015 4:32 PM, "TK tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi semperfikurt,

KStep has an isolated Analog output that operates much like a 3 pin potentiometer POT) where some supply voltage is applied (+5V, +10V, or +12V and GND) and the output voltage can be commanded to a voltage between GND and the Supply.  See the section "Optically isolated PWM to Analog Circuit" here:
http://www.dynomotion.com/Help/SchematicsKStep/ConnectorsKStep.htm

Note a separate supply (or voltage from the Spindle Drive) should be used as the analog source in order to avoid defeating the isolation between the Spindle and other control logic. So in your case use the P5 pin on the SuperPID as a +5V source to KStep AnalogVcc. Use the PG pin as the Analog GND on KStep.


Once connected the Example Program \C Progams\KStep\Spindle_S_Kstep.c can be configured to KMotionCNC's S Action on the Tool Setup | M0-30 page.  Configure as Exec Prog with Var #1 and some unused Thread (ie #2).


At this point commanding an S word in GCode or in the MDI input such as:

S300

should set a Voltage on the Analog Output to control the speed.  The Spindle Override Slider should then also control the speed. You might confirm this with a voltmeter connected with the Black wire to the Analog Gnd and the Red wire to the Analog Output.


To Scale the speed properly for your system adjust the factor in the Spindle_S_Kstep.c Program to an RPM value that your system runs when commanded ith the full Analog Voltage:

define RPM_FACTOR 500.0 // RPM for full duty cycle (max analog out)

HTH
Regards
TK

On 10/15/2015 12:19 PM, semperfikurt@... [DynoMotion] wrote:
 
I am working on setting up the PWM output to my spindle controller.  I can't seem to figure out what exactly I need to do to make this work as far as wiring and configuration goes.  I have the pwm input on my controller wired up to the pwm on KSTEP JP33 pin 6.... is this all I need to do?  The diagrams I have from the manufacturer of my spindle controller only show one wire input for this.  Also I don't really know what I need to set up in Kmotion to get the spindle overrides and S commands to function properly.  I have experimented a little with it, but it always just starts up and goes full blast RPM.  

I have gone through forums and such about this but being a bit of a noob, I don't understand 90 percent of what is being said.  

How exactly in idiot terms, do I set this up?

This is the router speed controller I am using.  The PWM control layout is on page 23.






Group: DynoMotion Message: 12406 From: TKSOFT Date: 10/17/2015
Subject: Re: PWM to spindle controller setup help.
Hi Kurt,

You should not need to use KMotion.exe in normal operation.
Everything should be initialized by the Init C Program executed from
KMotionCNC.

You may be missing a call in the Init program to enable your slave
axis. It should be something like:

EnableAxisDest(xx,0);

Where xx is the Axis Channel of the axis.

To turn on bit 16 you would add:

SetBitDirection(16,1); // set bit 16 as an output
SetBit(16); // set bit 16 on

to the Init Program.

HTH
Regards
TK

Quoting "kurt huizenga semperfikurt@... [DynoMotion]"
<DynoMotion@yahoogroups.com>:

> A few other little issues I have come across that I can't seem to
> iron out is the workflow... for normal cnc use do I need to run
> Kmotion at all or can I jump right into KmotionCNC? I have my INIT
> user button defined to load the "InitKStep3Axis.c" program which
> works fine, is that normally all that is required to get the machine
> running? 
>  The reason I ask is because I have had issues with one of my
> steppers that is slaved to another always being disabled... The
> dual-stepper Y axis only powers one motor until I go into the step
> response screen for the slaved motors' channel and click "enable"
> under the servo section.  Then when I copy and save that to the .c
> file it works okay but it doesn't stay like that after I turn it
> off.  Also the I/O bit 16 keeps being turned off and won't stay on
> the way I want it.  I can click it on and everything works fine
> again though.  
> I have gone through the copying configs to the open .c file and
> everything else I have configured thus far is working great but
> these two things for some reason won't stay put.  What should I do
> to solve this? 
>
>
> On Saturday, October 17, 2015 2:13 PM, "kurt huizenga
> semperfikurt@... [DynoMotion]" <DynoMotion@yahoogroups.com>
> wrote:
>
>
>   Ahh that worked perfectly!  I have been messing with that for
> the longest time, thanks so much!! 
>
>
> On Thursday, October 15, 2015 4:32 PM, "TK tk@...
> [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:
>
>
>   Hi semperfikurt,
>
> KStep has an isolated Analog output that operates much like a 3 pin
> potentiometer POT) where some supply voltage is applied (+5V, +10V,
> or +12V and GND) and the output voltage can be commanded to a
> voltage between GND and the Supply.  See the section "Optically
> isolated PWM to Analog Circuit" here:
> http://www.dynomotion.com/Help/SchematicsKStep/ConnectorsKStep.htm
>
> Note a separate supply (or voltage from the Spindle Drive) should
> be used as the analog source in order to avoid defeating the
> isolation between the Spindle and other control logic. So in your
> case use the P5 pin on the SuperPID as a +5V source to KStep
> AnalogVcc. Use the PG pin as the Analog GND on KStep.
>
>
> Once connected the Example Program \C
> Progams\KStep\Spindle_S_Kstep.c can be configured to KMotionCNC's S
> Action on the Tool Setup | M0-30 page.  Configure as Exec Prog with
> Var #1 and some unused Thread (ie #2).
>
>
> At this point commanding an S word in GCode or in the MDI input such as:
>
> S300
>
> should set a Voltage on the Analog Output to control the speed. 
> The Spindle Override Slider should then also control the speed. You
> might confirm this with a voltmeter connected with the Black wire to
> the Analog Gnd and the Red wire to the Analog Output.
>
>
> To Scale the speed properly for your system adjust the factor in
> the Spindle_S_Kstep.c Program to an RPM value that your system runs
> when commanded ith the full Analog Voltage:
>
> define RPM_FACTOR 500.0 // RPM for full duty cycle (max analog out)
>
> HTH
> Regards
> TK
>
> On 10/15/2015 12:19 PM, semperfikurt@... [DynoMotion] wrote:
>
>   I am working on setting up the PWM output to my spindle
> controller.  I can't seem to figure out what exactly I need to do to
> make this work as far as wiring and configuration goes.  I have the
> pwm input on my controller wired up to the pwm on KSTEP JP33 pin
> 6.... is this all I need to do?  The diagrams I have from the
> manufacturer of my spindle controller only show one wire input for
> this.  Also I don't really know what I need to set up in Kmotion to
> get the spindle overrides and S commands to function properly.  I
> have experimented a little with it, but it always just starts up and
> goes full blast RPM.  
> I have gone through forums and such about this but being a bit of
> a noob, I don't understand 90 percent of what is being said.  
> How exactly in idiot terms, do I set this up?
> This is the router speed controller I am using.  The PWM control
> layout is on page 23.
> http://www.vhipe.com/product-private/SuperPID-v2_Instructions.pdf
>
>
>
>
>
> #yiv7997978785 #yiv7997978785 -- #yiv7997978785ygrp-mkp
> {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0
> 10px;}#yiv7997978785 #yiv7997978785ygrp-mkp hr {border:1px solid
> #d8d8d8;}#yiv7997978785 #yiv7997978785ygrp-mkp #yiv7997978785hd
> {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
> 0;}#yiv7997978785 #yiv7997978785ygrp-mkp #yiv7997978785ads
> {margin-bottom:10px;}#yiv7997978785 #yiv7997978785ygrp-mkp
> .yiv7997978785ad {padding:0 0;}#yiv7997978785 #yiv7997978785ygrp-mkp
> .yiv7997978785ad p {margin:0;}#yiv7997978785 #yiv7997978785ygrp-mkp
> .yiv7997978785ad a
> {color:#0000ff;text-decoration:none;}#yiv7997978785
> #yiv7997978785ygrp-sponsor #yiv7997978785ygrp-lc
> {font-family:Arial;}#yiv7997978785 #yiv7997978785ygrp-sponsor
> #yiv7997978785ygrp-lc #yiv7997978785hd {margin:10px
> 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv7997978785
> #yiv7997978785ygrp-sponsor #yiv7997978785ygrp-lc .yiv7997978785ad
> {margin-bottom:10px;padding:0 0;}#yiv7997978785
> #yiv7997978785actions
> {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv7997978785
> #yiv7997978785activity
> {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv7997978785 #yiv7997978785activity span {font-weight:700;}#yiv7997978785 #yiv7997978785activity span:first-child {text-transform:uppercase;}#yiv7997978785 #yiv7997978785activity span a {color:#5085b6;text-decoration:none;}#yiv7997978785 #yiv7997978785activity span span {color:#ff7900;}#yiv7997978785 #yiv7997978785activity span .yiv7997978785underline {text-decoration:underline;}#yiv7997978785 .yiv7997978785attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv7997978785 .yiv7997978785attach div a {text-decoration:none;}#yiv7997978785 .yiv7997978785attach img {border:none;padding-right:5px;}#yiv7997978785 .yiv7997978785attach label {display:block;margin-bottom:5px;}#yiv7997978785 .yiv7997978785attach label a {text-decoration:none;}#yiv7997978785 blockquote {margin:0 0 0 4px;}#yiv7997978785 .yiv7997978785bold {font-family:Arial;font-size:13px;font-weigh
t:700;}#yiv7997978785 .yiv7997978785bold a {text-decoration:none;}#yiv7997978785 dd.yiv7997978785last p a {font-family:Verdana;font-weight:700;}#yiv7997978785 dd.yiv7997978785last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv7997978785 dd.yiv7997978785last p span.yiv7997978785yshortcuts {margin-right:0;}#yiv7997978785 div.yiv7997978785attach-table div div a {text-decoration:none;}#yiv7997978785 div.yiv7997978785attach-table {width:400px;}#yiv7997978785 div.yiv7997978785file-title a, #yiv7997978785 div.yiv7997978785file-title a:active, #yiv7997978785 div.yiv7997978785file-title a:hover, #yiv7997978785 div.yiv7997978785file-title a:visited {text-decoration:none;}#yiv7997978785 div.yiv7997978785photo-title a, #yiv7997978785 div.yiv7997978785photo-title a:active, #yiv7997978785 div.yiv7997978785photo-title a:hover, #yiv7997978785 div.yiv7997978785photo-title a:visited {text-decoration:none;}#yiv7997978785 div#yiv7997978785ygrp-mlmsg #yiv7997978785ygrp-msg p a span.
yiv7997978785yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv7997978785 .yiv7997978785green {color:#628c2a;}#yiv7997978785 .yiv7997978785MsoNormal {margin:0 0 0 0;}#yiv7997978785 o {font-size:0;}#yiv7997978785 #yiv7997978785photos div {float:left;width:72px;}#yiv7997978785 #yiv7997978785photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv7997978785 #yiv7997978785photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv7997978785 #yiv7997978785reco-category {font-size:77%;}#yiv7997978785 #yiv7997978785reco-desc {font-size:77%;}#yiv7997978785 .yiv7997978785replbq {margin:4px;}#yiv7997978785 #yiv7997978785ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv7997978785 #yiv7997978785ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv7997978785 #yiv7997978785ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv7997978785 #yiv79979
78785ygrp-mlmsg select, #yiv7997978785 input, #yiv7997978785 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv7997978785 #yiv7997978785ygrp-mlmsg pre, #yiv7997978785 code {font:115% monospace;}#yiv7997978785 #yiv7997978785ygrp-mlmsg * {line-height:1.22em;}#yiv7997978785 #yiv7997978785ygrp-mlmsg #yiv7997978785logo {padding-bottom:10px;}#yiv7997978785 #yiv7997978785ygrp-msg p a {font-family:Verdana;}#yiv7997978785 #yiv7997978785ygrp-msg p#yiv7997978785attach-count span {color:#1E66AE;font-weight:700;}#yiv7997978785 #yiv7997978785ygrp-reco #yiv7997978785reco-head {color:#ff7900;font-weight:700;}#yiv7997978785 #yiv7997978785ygrp-reco {margin-bottom:20px;padding:0px;}#yiv7997978785 #yiv7997978785ygrp-sponsor #yiv7997978785ov li a {font-size:130%;text-decoration:none;}#yiv7997978785 #yiv7997978785ygrp-sponsor #yiv7997978785ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv7997978785 #yiv7997978785ygrp-sponsor #yiv7997978785ov ul {margin:0;padding:0 0 0 8px;}#yiv799
7978785 #yiv7997978785ygrp-text {font-family:Georgia;}#yiv7997978785 #yiv7997978785ygrp-text p {margin:0 0 1em 0;}#yiv7997978785 #yiv7997978785ygrp-text tt {font-size:120%;}#yiv7997978785 #yiv7997978785ygrp-vital ul li:last-child {border-right:none
> !important;}#yiv7997978785
Group: DynoMotion Message: 12414 From: kurt huizenga Date: 10/19/2015
Subject: Re: PWM to spindle controller setup help.
So I took a look under the hood and I added the lines about I/0 bit 16 and that's all good to go however, when I looked at channel 3, the line about it being enabled and slaved to channel 1 was already there.  I tried deleting it and re-adding it again.  Still no dice... I still have to click "enable" under the servo area of step response in kmotion.  I went ahead and copied my program into wordpad and attached that to this email if it helps sort some of this out.  



On Saturday, October 17, 2015 3:34 PM, "tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi Kurt,

You should not need to use KMotion.exe in normal operation.
Everything should be initialized by the Init C Program executed from
KMotionCNC.

You may be missing a call in the Init program to enable your slave
axis. It should be something like:

EnableAxisDest(xx,0);

Where xx is the Axis Channel of the axis.

To turn on bit 16 you would add:

SetBitDirection(16,1); // set bit 16 as an output
SetBit(16); // set bit 16 on

to the Init Program.

HTH
Regards
TK

Quoting "kurt huizenga semperfikurt@... [DynoMotion]"
<DynoMotion@yahoogroups.com>:

> A few other little issues I have come across that I can't seem to
> iron out is the workflow... for normal cnc use do I need to run
> Kmotion at all or can I jump right into KmotionCNC? I have my INIT
> user button defined to load the "InitKStep3Axis.c" program which
> works fine, is that normally all that is required to get the machine
> running? 
>  The reason I ask is because I have had issues with one of my
> steppers that is slaved to another always being disabled... The
> dual-stepper Y axis only powers one motor until I go into the step
> response screen for the slaved motors' channel and click "enable"
> under the servo section.  Then when I copy and save that to the .c
> file it works okay but it doesn't stay like that after I turn it
> off.  Also the I/O bit 16 keeps being turned off and won't stay on
> the way I want it.  I can click it on and everything works fine
> again though.  
> I have gone through the copying configs to the open .c file and
> everything else I have configured thus far is working great but
> these two things for some reason won't stay put.  What should I do
> to solve this? 
>
>
> On Saturday, October 17, 2015 2:13 PM, "kurt huizenga
> semperfikurt@... [DynoMotion]" <DynoMotion@yahoogroups.com>
> wrote:
>
>
>   Ahh that worked perfectly!  I have been messing with that for
> the longest time, thanks so much!! 
>
>
> On Thursday, October 15, 2015 4:32 PM, "TK tk@...
> [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:
>
>
>   Hi semperfikurt,
>
> KStep has an isolated Analog output that operates much like a 3 pin
> potentiometer POT) where some supply voltage is applied (+5V, +10V,
> or +12V and GND) and the output voltage can be commanded to a
> voltage between GND and the Supply.  See the section "Optically
> isolated PWM to Analog Circuit" here:
> http://www.dynomotion.com/Help/SchematicsKStep/ConnectorsKStep.htm
>
> Note a separate supply (or voltage from the Spindle Drive) should
> be used as the analog source in order to avoid defeating the
> isolation between the Spindle and other control logic. So in your
> case use the P5 pin on the SuperPID as a +5V source to KStep
> AnalogVcc. Use the PG pin as the Analog GND on KStep.
>
>
> Once connected the Example Program \C
> Progams\KStep\Spindle_S_Kstep.c can be configured to KMotionCNC's S
> Action on the Tool Setup | M0-30 page.  Configure as Exec Prog with
> Var #1 and some unused Thread (ie #2).
>
>
> At this point commanding an S word in GCode or in the MDI input such as:
>
> S300
>
> should set a Voltage on the Analog Output to control the speed. 
> The Spindle Override Slider should then also control the speed. You
> might confirm this with a voltmeter connected with the Black wire to
> the Analog Gnd and the Red wire to the Analog Output.
>
>
> To Scale the speed properly for your system adjust the factor in
> the Spindle_S_Kstep.c Program to an RPM value that your system runs
> when commanded ith the full Analog Voltage:
>
> define RPM_FACTOR 500.0 // RPM for full duty cycle (max analog out)
>
> HTH
> Regards
> TK
>
> On 10/15/2015 12:19 PM, semperfikurt@... [DynoMotion] wrote:
>
>   I am working on setting up the PWM output to my spindle
> controller.  I can't seem to figure out what exactly I need to do to
> make this work as far as wiring and configuration goes.  I have the
> pwm input on my controller wired up to the pwm on KSTEP JP33 pin
> 6.... is this all I need to do?  The diagrams I have from the
> manufacturer of my spindle controller only show one wire input for
> this.  Also I don't really know what I need to set up in Kmotion to
> get the spindle overrides and S commands to function properly.  I
> have experimented a little with it, but it always just starts up and
> goes full blast RPM.  
> I have gone through forums and such about this but being a bit of
> a noob, I don't understand 90 percent of what is being said.  
> How exactly in idiot terms, do I set this up?
> This is the router speed controller I am using.  The PWM control
> layout is on page 23.
> http://www.vhipe.com/product-private/SuperPID-v2_Instructions.pdf
>
>
>
>
>
> #yiv7997978785 #yiv7997978785 -- #yiv7997978785ygrp-mkp
> {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0
> 10px;}#yiv7997978785 #yiv7997978785ygrp-mkp hr {border:1px solid
> #d8d8d8;}#yiv7997978785 #yiv7997978785ygrp-mkp #yiv7997978785hd
> {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
> 0;}#yiv7997978785 #yiv7997978785ygrp-mkp #yiv7997978785ads
> {margin-bottom:10px;}#yiv7997978785 #yiv7997978785ygrp-mkp
> .yiv7997978785ad {padding:0 0;}#yiv7997978785 #yiv7997978785ygrp-mkp
> .yiv7997978785ad p {margin:0;}#yiv7997978785 #yiv7997978785ygrp-mkp
> .yiv7997978785ad a
> {color:#0000ff;text-decoration:none;}#yiv7997978785
> #yiv7997978785ygrp-sponsor #yiv7997978785ygrp-lc
> {font-family:Arial;}#yiv7997978785 #yiv7997978785ygrp-sponsor
> #yiv7997978785ygrp-lc #yiv7997978785hd {margin:10px
> 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv7997978785
> #yiv7997978785ygrp-sponsor #yiv7997978785ygrp-lc .yiv7997978785ad
> {margin-bottom:10px;padding:0 0;}#yiv7997978785
> #yiv7997978785actions
> {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv7997978785
> #yiv7997978785activity
> {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv7997978785 #yiv7997978785activity span {font-weight:700;}#yiv7997978785 #yiv7997978785activity span:first-child {text-transform:uppercase;}#yiv7997978785 #yiv7997978785activity span a {color:#5085b6;text-decoration:none;}#yiv7997978785 #yiv7997978785activity span span {color:#ff7900;}#yiv7997978785 #yiv7997978785activity span .yiv7997978785underline {text-decoration:underline;}#yiv7997978785 .yiv7997978785attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv7997978785 .yiv7997978785attach div a {text-decoration:none;}#yiv7997978785 .yiv7997978785attach img {border:none;padding-right:5px;}#yiv7997978785 .yiv7997978785attach label {display:block;margin-bottom:5px;}#yiv7997978785 .yiv7997978785attach label a {text-decoration:none;}#yiv7997978785 blockquote {margin:0 0 0 4px;}#yiv7997978785 .yiv7997978785bold {font-family:Arial;font-size:13px;font-weigh
t:700;}#yiv7997978785 .yiv7997978785bold a {text-decoration:none;}#yiv7997978785 dd.yiv7997978785last p a {font-family:Verdana;font-weight:700;}#yiv7997978785 dd.yiv7997978785last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv7997978785 dd.yiv7997978785last p span.yiv7997978785yshortcuts {margin-right:0;}#yiv7997978785 div.yiv7997978785attach-table div div a {text-decoration:none;}#yiv7997978785 div.yiv7997978785attach-table {width:400px;}#yiv7997978785 div.yiv7997978785file-title a, #yiv7997978785 div.yiv7997978785file-title a:active, #yiv7997978785 div.yiv7997978785file-title a:hover, #yiv7997978785 div.yiv7997978785file-title a:visited {text-decoration:none;}#yiv7997978785 div.yiv7997978785photo-title a, #yiv7997978785 div.yiv7997978785photo-title a:active, #yiv7997978785 div.yiv7997978785photo-title a:hover, #yiv7997978785 div.yiv7997978785photo-title a:visited {text-decoration:none;}#yiv7997978785 div#yiv7997978785ygrp-mlmsg #yiv7997978785ygrp-msg p a span.
yiv7997978785yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv7997978785 .yiv7997978785green {color:#628c2a;}#yiv7997978785 .yiv7997978785MsoNormal {margin:0 0 0 0;}#yiv7997978785 o {font-size:0;}#yiv7997978785 #yiv7997978785photos div {float:left;width:72px;}#yiv7997978785 #yiv7997978785photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv7997978785 #yiv7997978785photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv7997978785 #yiv7997978785reco-category {font-size:77%;}#yiv7997978785 #yiv7997978785reco-desc {font-size:77%;}#yiv7997978785 .yiv7997978785replbq {margin:4px;}#yiv7997978785 #yiv7997978785ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv7997978785 #yiv7997978785ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv7997978785 #yiv7997978785ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv7997978785 #yiv79979
78785ygrp-mlmsg select, #yiv7997978785 input, #yiv7997978785 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv7997978785 #yiv7997978785ygrp-mlmsg pre, #yiv7997978785 code {font:115% monospace;}#yiv7997978785 #yiv7997978785ygrp-mlmsg * {line-height:1.22em;}#yiv7997978785 #yiv7997978785ygrp-mlmsg #yiv7997978785logo {padding-bottom:10px;}#yiv7997978785 #yiv7997978785ygrp-msg p a {font-family:Verdana;}#yiv7997978785 #yiv7997978785ygrp-msg p#yiv7997978785attach-count span {color:#1E66AE;font-weight:700;}#yiv7997978785 #yiv7997978785ygrp-reco #yiv7997978785reco-head {color:#ff7900;font-weight:700;}#yiv7997978785 #yiv7997978785ygrp-reco {margin-bottom:20px;padding:0px;}#yiv7997978785 #yiv7997978785ygrp-sponsor #yiv7997978785ov li a {font-size:130%;text-decoration:none;}#yiv7997978785 #yiv7997978785ygrp-sponsor #yiv7997978785ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv7997978785 #yiv7997978785ygrp-sponsor #yiv7997978785ov ul {margin:0;padding:0 0 0 8px;}#yiv799
7978785 #yiv7997978785ygrp-text {font-family:Georgia;}#yiv7997978785 #yiv7997978785ygrp-text p {margin:0 0 1em 0;}#yiv7997978785 #yiv7997978785ygrp-text tt {font-size:120%;}#yiv7997978785 #yiv7997978785ygrp-vital ul li:last-child {border-right:none
> !important;}#yiv7997978785



  @@attachment@@
Group: DynoMotion Message: 12415 From: TK Date: 10/19/2015
Subject: Re: PWM to spindle controller setup help. [1 Attachment]
Hi Kurt,

Your C Program enables Axis 1 twice but not Axis 3.

Regards
TK

On 10/19/2015 1:28 AM, kurt huizenga semperfikurt@... [DynoMotion] wrote:
 
So I took a look under the hood and I added the lines about I/0 bit 16 and that's all good to go however, when I looked at channel 3, the line about it being enabled and slaved to channel 1 was already there.  I tried deleting it and re-adding it again.  Still no dice... I still have to click "enable" under the servo area of step response in kmotion.  I went ahead and copied my program into wordpad and attached that to this email if it helps sort some of this out.  



On Saturday, October 17, 2015 3:34 PM, "tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi Kurt,

You should not need to use KMotion.exe in normal operation.
Everything should be initialized by the Init C Program executed from
KMotionCNC.

You may be missing a call in the Init program to enable your slave
axis. It should be something like:

EnableAxisDest(xx,0);

Where xx is the Axis Channel of the axis.

To turn on bit 16 you would add:

SetBitDirection(16,1); // set bit 16 as an output
SetBit(16); // set bit 16 on

to the Init Program.

HTH
Regards
TK

Quoting "kurt huizenga semperfikurt@... [DynoMotion]"
<DynoMotion@yahoogroups.com>:

> A few other little issues I have come across that I can't seem to
> iron out is the workflow... for normal cnc use do I need to run
> Kmotion at all or can I jump right into KmotionCNC? I have my INIT
> user button defined to load the "InitKStep3Axis.c" program which
> works fine, is that normally all that is required to get the machine
> running? 
>  The reason I ask is because I have had issues with one of my
> steppers that is slaved to another always being disabled... The
> dual-stepper Y axis only powers one motor until I go into the step
> response screen for the slaved motors' channel and click "enable"
> under the servo section.  Then when I copy and save that to the .c
> file it works okay but it doesn't stay like that after I turn it
> off.  Also the I/O bit 16 keeps being turned off and won't stay on
> the way I want it.  I can click it on and everything works fine
> again though.  
> I have gone through the copying configs to the open .c file and
> everything else I have configured thus far is working great but
> these two things for some reason won't stay put.  What should I do
> to solve this? 
>
>
> On Saturday, October 17, 2015 2:13 PM, "kurt huizenga
> semperfikurt@... [DynoMotion]" <DynoMotion@yahoogroups.com>
> wrote:
>
>
>   Ahh that worked perfectly!  I have been messing with that for
> the longest time, thanks so much!! 
>
>
> On Thursday, October 15, 2015 4:32 PM, "TK tk@...
> [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:
>
>